import {Component, Vue, Watch} from 'vue-property-decorator'

@Component({
    name: 'BaseVue'
})
export default class BaseVue extends Vue {
    /**
     * 分页配置
     */
    // pagination: any = {
    //     current: 0,
    //     pageSize: 3,
    //     showQuickJumper: true,
    //     showSizeChanger: true,
    //     pageSizeOptions: ['3', '10', '20', '50', '100', '500'],
    //     showTotal: (total: any, range: any) => {
    //         return `共 ${total} 条数据`
    //     },
    //     change: (page: any, pageSize: any) => {
    //         this.pagination.current = page;
    //         this.pagination.pageSize = pageSize;
    //     },
    //     showSizeChange: (current: any, size: any) => {
    //         this.pagination.current = current;
    //         this.pagination.pageSize = size;
    //     },
    // };

    /**
     *table相关
     */
    selectedRowKeys = [];//
    selectedRows = [];//

    /**
     * 查询相关
     */
    advanced: boolean = false;//高级查询开关
    // 查询参数
    queryParam: any = {
        current: 1,
        pageSize: 10,
    };

    toggleAdvanced() {
        this.advanced = !this.advanced
    }

    @Watch('$route')
    private onRouteChange() {
        //console.log(`$route:`, this.$route);
    }

}
